﻿@using System.Text.Encodings.Web
@using Grand.Business.Core.Interfaces.Checkout.Orders
@using Grand.Domain.Payments
@using Grand.Domain.Tax
@using Constants = Grand.SharedUIResources.Constants
@model OrderModel
@inject IOrderTagService orderTagService


<link rel="stylesheet" type="text/css" asp-src="@(Constants.WwwRoot)/administration/tagEditor/jquery.tag-editor.css"/>
<script asp-location="Footer" asp-src="@(Constants.WwwRoot)/administration/tagEditor/jquery.tag-editor.min.js"></script>
<script asp-location="Footer" asp-src="@(Constants.WwwRoot)/administration/tagEditor/jquery.caret.min.js"></script>

@{
    //tags
    var orderTags = await orderTagService.GetAllOrderTags();
    var orderTagsSB = new StringBuilder();
    orderTagsSB.Append("var initialOrderTags = [");
    for (var i = 0; i < orderTags.Count; i++)
    {
        var tag = orderTags[i];
        orderTagsSB.Append("'");
        orderTagsSB.Append(JavaScriptEncoder.Default.Encode(tag.Name));
        orderTagsSB.Append("'");
        if (i != orderTags.Count - 1)
        {
            orderTagsSB.Append(",");
        }
    }

    orderTagsSB.Append("]");
}

<script>
        $(document).ready(function() {
            toggleChangeOrderStatus(false);
            toggleOrderTotals(false);

            //tags
            @Html.Raw(orderTagsSB.ToString())
            $("#@Html.IdFor(model => model.OrderTags)").tagEditor({
                autocomplete: {
                    delay: 0,
                    position: { collision: 'flip' },
                    source: initialOrderTags
                },
                delimiter: ',',
                placeholder: 'Enter tags...'
            });
        });

        function toggleChangeOrderStatus(editmode) {
            if (editmode) {
                $('#pnlChangeOrderStatus').show();
                $('#btnChangeOrderStatus').hide();
            } else {
                $('#pnlChangeOrderStatus').hide();
                $('#btnChangeOrderStatus').show();
            }
        }

        function toggleOrderTotals(editmode) {
            if (editmode) {
                $('#trEditOrderTotals').show();
                $('#btnEditOrderTotals').hide();
                $('#btnSaveOrderTotals').show();
                $('#btnCancelOrderTotals').show();
            } else {
                $('#trEditOrderTotals').hide();
                $('#btnEditOrderTotals').show();
                $('#btnSaveOrderTotals').hide();
                $('#btnCancelOrderTotals').hide();
            }
        }

    </script>

<div class="form-horizontal">
<vc:admin-widget widget-zone="order_details_info_top" additional-data="Model"/>
<div class="form-body">
<div class="form-group">
    <admin-label asp-for="OrderNumber" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
    <div class="col-9 col-md-9 col-sm-9">
        <label class="control-label">@Model.OrderNumber</label>
    </div>
</div>

<div class="form-group order-status-block @Model.OrderStatus">
    <admin-label asp-for="OrderStatus" asp-display-hint="false" class="control-label col-12 col-md-3 col-sm-3 pt-2"></admin-label>
    <div class="col-12 col-md-9 col-sm-9 orderEditBtn">
        <div class="d-inline-flex w-100 align-items-center mb-3">
            <div class="alert mb-0">
                @Model.OrderStatus
            </div>&nbsp;&nbsp;&nbsp;&nbsp;
            @if (Model.CanCancelOrder)
            {
                <input type="submit" name="cancelorder" asp-action="CancelOrder" value="@Loc["Admin.Orders.Fields.OrderStatus.Cancel"]" id="cancelorder" class="btn red" onclick="return confirm('@Loc["Admin.Common.AreYouSure"]');"/>
            }
            <input type="submit" name="btnChangeOrderStatus" value="@Loc["Admin.Orders.Fields.OrderStatus.Change"]" onclick="toggleChangeOrderStatus(true);return false;" id="btnChangeOrderStatus" class="btn green"/>
        </div>
        <div id="pnlChangeOrderStatus">
            <div class="note note-info">@Loc["Admin.Orders.Fields.OrderStatus.Change.ForAdvancedUsers"]</div>
            <admin-select asp-for="OrderStatusId" asp-items="Model.OrderStatuses"/>
            <div class="form-actions btn-group btn-group-devided mt-3">
                <input type="submit" name="btnSaveOrderStatus" asp-action="ChangeOrderStatus" value="@Loc["Admin.Common.Save"]" id="btnSaveOrderStatus" class="k-button" onclick="return confirm('@Loc["Admin.Common.AreYouSure"]');"/>
                <input type="submit" name="btnCancelOrderStatus" value="@Loc["Admin.Common.Cancel"]" onclick="toggleChangeOrderStatus(false);return false;" id="btnCancelOrderStatus" class="k-button"/>
            </div>
        </div>
    </div>
</div>

<div class="form-group">
    <admin-label asp-for="ShippingStatus" asp-display-hint="false" class="control-label col-12 col-md-3 col-sm-3"></admin-label>
    <div class="col-12 col-md-9 col-sm-9">
        <label class="control-label">
            @Model.ShippingStatus
        </label>
    </div>
</div>

<div class="form-group">
    <admin-label asp-for="PaymentStatus" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
    <div class="col-9 col-md-9 col-sm-9">
        @{
            var labelStatus = "";
            switch (Model.PaymentStatusEnum)
            {
                case PaymentStatus.Paid:
                    labelStatus = "success";
                    break;
                case PaymentStatus.PartiallyPaid:
                    labelStatus = "info";
                    break;
                case PaymentStatus.Pending:
                    labelStatus = "default";
                    break;
                case PaymentStatus.Authorized:
                    labelStatus = "info";
                    break;
                case PaymentStatus.PartiallyRefunded:
                    labelStatus = "info";
                    break;
                case PaymentStatus.Refunded:
                    labelStatus = "warning";
                    break;
                case PaymentStatus.Voided:
                    labelStatus = "danger";
                    break;
            }
        }
        <div>

            <a class="btn btn-@labelStatus" href="@Url.Action("Edit", "PaymentTransaction", new { id = Model.PaymentTransactionId, area = Grand.Web.Admin.Extensions.Constants.AreaAdmin })">@Model.PaymentStatus - @Loc["Admin.Common.View"]</a>

        </div>
    </div>
</div>

<div class="form-group" id="trEditOrderTags">
    <admin-label asp-for="OrderTags"/>
    <div class="col-md-9 col-sm-9">
        <span asp-validation-for="OrderTags"></span>
        <div class="input-group flex-nowrap w-100">
            <admin-input asp-for="OrderTags"/>
            <input type="submit" name="btnSaveOrderTags" asp-action="SaveOrderTags" value="@Loc["Admin.Orders.Fields.SaveOrderTags"]" id="btnSaveOrderTags" class="k-button" onclick=" return confirm('@Loc["Admin.Common.AreYouSure"]'); "/>
        </div>
    </div>
</div>

@if (!string.IsNullOrEmpty(Model.Code))
{
    <div class="form-group">
        <admin-label asp-for="Code" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
        <div class="col-9 col-md-9 col-sm-9">
            <label class="control-label">@Model.Code</label>
        </div>
    </div>
}
<div class="form-group">
    <admin-label asp-for="CurrencyCode" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
    <div class="col-9 col-md-9 col-sm-9">
        <label class="control-label">
            @Model.CurrencyCode
            @if (Model.CurrencyRate != 1)
            {
                <text>(@Model.CurrencyRate)</text>
            }
        </label>
    </div>
</div>

<div class="form-group">
    <admin-label asp-for="OrderGuid" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
    <div class="col-9 col-md-9 col-sm-9">
        <label class="control-label">@Model.OrderGuid</label>
    </div>
</div>

<div class="form-group">
    <admin-label asp-for="StoreName" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
    <div class="col-9 col-md-9 col-sm-9">
        <label class="control-label">@Model.StoreName</label>
    </div>
</div>

<div class="form-group">
    <admin-label asp-for="CustomerId" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
    <div class="col-9 col-md-9 col-sm-9">
        <label class="control-label">
            @Html.ActionLink(Model.CustomerInfo, "Edit", "Customer", new { id = Model.CustomerId }, new { })
        </label>
    </div>
</div>
<div class="form-group">
    <admin-label asp-for="CustomerIp" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
    <div class="col-9 col-md-9 col-sm-9">
        <label class="control-label">@Model.CustomerIp</label>
    </div>
</div>
@if (!string.IsNullOrEmpty(Model.VatNumber))
{
    <div class="form-group">
        <admin-label asp-for="VatNumber" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
        <div class="col-9 col-md-9 col-sm-9">
            <label class="control-label">@Model.VatNumber</label>
        </div>
    </div>
}
@if (!string.IsNullOrEmpty(Model.AffiliateId))
{
    <div class="form-group">
        <admin-label asp-for="AffiliateId" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
        <div class="col-9 col-md-9 col-sm-9">
            <label class="control-label">
                <a href="@Url.Action("Edit", "Affiliate", new { id = Model.AffiliateId, area = Grand.Web.Admin.Extensions.Constants.AreaAdmin })">@Model.AffiliateName - @Loc["Admin.Common.View"]</a>
            </label>
        </div>
    </div>
}
@if (!string.IsNullOrEmpty(Model.SalesEmployeeId))
{
    <div class="form-group">
        <admin-label asp-for="SalesEmployeeId" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
        <div class="col-9 col-md-9 col-sm-9">
            <label class="control-label">@Model.SalesEmployeeName</label>
        </div>
    </div>
}
@if (Model.TaxDisplayType == TaxDisplayType.IncludingTax)
{
    <div class="form-group">
        <admin-label asp-for="OrderSubtotalInclTax" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
        <div class="col-9 col-md-9 col-sm-9">
            <label class="control-label">@Model.OrderSubtotalInclTax</label>
        </div>
    </div>
}
@if (Model.TaxDisplayType == TaxDisplayType.ExcludingTax)
{
    <div class="form-group">
        <admin-label asp-for="OrderSubtotalExclTax" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
        <div class="col-9 col-md-9 col-sm-9">
            <label class="control-label">@Model.OrderSubtotalExclTax</label>
        </div>
    </div>
}
@if (Model.TaxDisplayType == TaxDisplayType.IncludingTax
     && !string.IsNullOrEmpty(Model.OrderSubTotalDiscountInclTax))
{
    <div class="form-group">
        <admin-label asp-for="OrderSubTotalDiscountInclTax" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
        <div class="col-9 col-md-9 col-sm-9">
            <label class="control-label">@Model.OrderSubTotalDiscountInclTax</label>
        </div>
    </div>
}
@if (Model.TaxDisplayType == TaxDisplayType.ExcludingTax
     && !string.IsNullOrEmpty(Model.OrderSubTotalDiscountExclTax))
{
    <div class="form-group">
        <admin-label asp-for="OrderSubTotalDiscountExclTax" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
        <div class="col-9 col-md-9 col-sm-9">
            <label class="control-label">@Model.OrderSubTotalDiscountExclTax</label>
        </div>
    </div>
}
@if (Model.TaxDisplayType == TaxDisplayType.IncludingTax)
{
    <div class="form-group">
        <admin-label asp-for="OrderShippingInclTax" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
        <div class="col-9 col-md-9 col-sm-9">
            <label class="control-label">@Model.OrderShippingInclTax</label>
        </div>
    </div>
}
@if (Model.TaxDisplayType == TaxDisplayType.ExcludingTax)
{
    <div class="form-group">
        <admin-label asp-for="OrderShippingExclTax" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
        <div class="col-9 col-md-9 col-sm-9">
            <label class="control-label">@Model.OrderShippingExclTax</label>
        </div>
    </div>
}
@if (Model.TaxDisplayType == TaxDisplayType.IncludingTax
     && !string.IsNullOrEmpty(Model.PaymentMethodAdditionalFeeInclTax))
{
    <div class="form-group">
        <admin-label asp-for="PaymentMethodAdditionalFeeInclTax" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
        <div class="col-9 col-md-9 col-sm-9">
            <label class="control-label">@Model.PaymentMethodAdditionalFeeInclTax</label>
        </div>
    </div>
}
@if (Model.TaxDisplayType == TaxDisplayType.ExcludingTax
     && !string.IsNullOrEmpty(Model.PaymentMethodAdditionalFeeExclTax))
{
    <div class="form-group">
        <admin-label asp-for="PaymentMethodAdditionalFeeExclTax" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
        <div class="col-9 col-md-9 col-sm-9">
            <label class="control-label">@Model.PaymentMethodAdditionalFeeExclTax</label>
        </div>
    </div>
}
@if (Model.DisplayTaxRates)
{
    foreach (var tr in Model.TaxRates)
    {
        <div class="form-group">
            <admin-label asp-for="Tax" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
            <div class="col-9 col-md-9 col-sm-9">
                <label class="control-label">@tr.Rate% - @tr.Value</label>
            </div>
        </div>
    }
}
@if (Model.DisplayTax)
{
    <div class="form-group">
        <admin-label asp-for="Tax" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
        <div class="col-9 col-md-9 col-sm-9">
            <label class="control-label">@Model.Tax</label>
        </div>
    </div>
}
@if (!string.IsNullOrEmpty(Model.OrderTotalDiscount))
{
    <div class="form-group">
        <admin-label asp-for="OrderTotalDiscount" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
        <div class="col-9 col-md-9 col-sm-9">
            <label class="control-label">@Model.OrderTotalDiscount</label>
        </div>
    </div>
}
@foreach (var gc in Model.GiftVouchers)
{
    <div class="form-group">
        <admin-label asp-for="GiftVouchers[0].CouponCode" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
        <div class="col-9 col-md-9 col-sm-9">
            <label class="control-label">(@(gc.CouponCode))</label>
            <label class="control-label">@gc.Amount</label>
        </div>
    </div>
}
@if (Model.RedeemedLoyaltyPoints > 0)
{
    <div class="form-group">
        <admin-label asp-for="RedeemedLoyaltyPoints" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
        <div class="col-9 col-md-9 col-sm-9">
            <label class="control-label">
                @Model.RedeemedLoyaltyPoints @Loc["Admin.Orders.Fields.RedeemedLoyaltyPoints.Points"]
                <text>/</text>
                @Model.RedeemedLoyaltyPointsAmount
            </label>
        </div>
    </div>
}
<div class="form-group">
    <admin-label asp-for="OrderTotal" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
    <div class="col-9 col-md-9 col-sm-9">
        <label class="control-label">@Model.OrderTotal</label>
    </div>
</div>
@if (!string.IsNullOrEmpty(Model.RefundedAmount))
{
    <div class="form-group">
        <admin-label asp-for="RefundedAmount" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
        <div class="col-9 col-md-9 col-sm-9">
            <label class="control-label">@Model.RefundedAmount</label>
        </div>
    </div>
}
@if (!string.IsNullOrEmpty(Model.SuggestedRefundedAmount))
{
    <div class="form-group">
        <admin-label asp-for="SuggestedRefundedAmount" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
        <div class="col-9 col-md-9 col-sm-9">
            <label class="control-label">@Model.SuggestedRefundedAmount</label>
        </div>
    </div>
}
@if (Model.UsedDiscounts.Count > 0)
{
    <div class="form-group">
        <admin-label asp-for="UsedDiscounts" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
        <div class="col-9 col-md-9 col-sm-9">
            @for (var i = 0; i < Model.UsedDiscounts.Count; i++)
            {
                var discount = Model.UsedDiscounts[i];
                <label class="control-label">
                    <a href="@Url.Action("Edit", "Discount", new { id = discount.DiscountId, area = Grand.Web.Admin.Extensions.Constants.AreaAdmin })">@discount.DiscountName</a>
                    @if (i != Model.UsedDiscounts.Count - 1)
                    {
                        <text>,</text>
                    }
                </label>
            }
        </div>
    </div>
}
<div class="form-group">
    <admin-label asp-for="Profit" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
    <div class="col-9 col-md-9 col-sm-9">
        <label class="control-label">@Model.Profit</label>
    </div>
</div>

<div class="form-group" id="trEditOrderTotals">
    <label class="control-label col-md-3"></label>
    <div class="col-12 col-md-12 col-sm-12">
        <div class="form-horizontal portlet light bg-inverse form-fit">
            <div class="form-body">
                <div class="form-group">
                    <admin-label asp-for="OrderSubtotalInclTaxValue" asp-display-hint="false" class="control-label col-12 col-md-3 col-sm-3"></admin-label>
                    <div class="col-8 col-md-4 col-sm-6">
                        <label class="control-label"> @Loc["Admin.Orders.Fields.Edit.InclTax"] </label>
                        <admin-input asp-for="OrderSubtotalInclTaxValue"/>
                    </div>
                    <div class="col-8 col-md-4 col-sm-6">
                        <label class="control-label">@Loc["Admin.Orders.Fields.Edit.ExclTax"] </label>
                        <admin-input asp-for="OrderSubtotalExclTaxValue"/>
                    </div>
                </div>
                <div class="form-group">
                    <admin-label asp-for="OrderSubTotalDiscountInclTaxValue" asp-display-hint="false" class="control-label col-12 col-md-3 col-sm-3"></admin-label>
                    <div class="col-8 col-md-4 col-sm-6">
                        <label class="control-label">@Loc["Admin.Orders.Fields.Edit.InclTax"] </label>
                        <admin-input asp-for="OrderSubTotalDiscountInclTaxValue"/>
                    </div>
                    <div class="col-8 col-md-4 col-sm-6">
                        <label class="control-label">@Loc["Admin.Orders.Fields.Edit.ExclTax"] </label>
                        <admin-input asp-for="OrderSubTotalDiscountExclTaxValue"/>
                    </div>
                </div>
                <div class="form-group">
                    <admin-label asp-for="OrderShippingInclTaxValue" asp-display-hint="false" class="control-label col-12 col-md-3 col-sm-3"></admin-label>
                    <div class="col-8 col-md-4 col-sm-6">
                        <label class="control-label">@Loc["Admin.Orders.Fields.Edit.InclTax"] </label>
                        <admin-input asp-for="OrderShippingInclTaxValue"/>
                    </div>
                    <div class="col-8 col-md-4 col-sm-6">
                        <label class="control-label">@Loc["Admin.Orders.Fields.Edit.ExclTax"]</label>
                        <admin-input asp-for="OrderShippingExclTaxValue"/>
                    </div>
                </div>
                <div class="form-group">
                    <admin-label asp-for="PaymentMethodAdditionalFeeInclTaxValue" asp-display-hint="false" class="control-label col-12 col-md-3 col-sm-3"></admin-label>
                    <div class="col-8 col-md-4 col-sm-6">
                        <label class="control-label"> @Loc["Admin.Orders.Fields.Edit.InclTax"] </label>
                        <admin-input asp-for="PaymentMethodAdditionalFeeInclTaxValue"/>
                    </div>
                    <div class="col-8 col-md-4 col-sm-6">
                        <label class="control-label"> @Loc["Admin.Orders.Fields.Edit.ExclTax"] </label>
                        <admin-input asp-for="PaymentMethodAdditionalFeeExclTaxValue"/>
                    </div>
                </div>
                <div class="form-group">
                    <admin-label asp-for="TaxValue" asp-display-hint="false" class="control-label col-12 col-md-3 col-sm-3"></admin-label>
                    <div class="col-md-8">
                        <admin-input asp-for="TaxValue"/>
                    </div>
                </div>
                <div class="form-group">
                    <admin-label asp-for="OrderTotalDiscountValue" asp-display-hint="false" class="control-label col-12 col-md-3 col-sm-3"></admin-label>
                    <div class="col-md-8">
                        <admin-input asp-for="OrderTotalDiscountValue"/>
                    </div>
                </div>
                <div class="form-group">
                    <admin-label asp-for="CurrencyRate" asp-display-hint="false" class="control-label col-12 col-md-3 col-sm-3"></admin-label>
                    <div class="col-md-8">
                        <admin-input asp-for="CurrencyRate"/>
                    </div>
                </div>
                <div class="form-group">
                    <admin-label asp-for="OrderTotalValue" asp-display-hint="false" class="control-label col-12 col-md-3 col-sm-3"></admin-label>
                    <div class="col-md-8">
                        <admin-input asp-for="OrderTotalValue"/>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="form-group">
    <label class="control-label col-md-3"></label>
    <div class="col-md-9 actions btn-group btn-group-devided">
        <button type="submit" id="btnEditOrderTotals" onclick=" toggleOrderTotals(true);return false; " name="btnEditOrderTotals" class="k-button"><span class="k-icon k-i-edit"></span>&nbsp;@Loc["Admin.Orders.Fields.EditOrderTotals"]</button>
        <input type="submit" name="btnSaveOrderTotals" asp-action="EditOrderTotals" value="@Loc["Admin.Orders.Fields.SaveOrderTotals"]" id="btnSaveOrderTotals" class="k-button" onclick=" return confirm('@Loc["Admin.Common.AreYouSure"]'); "/>
        <input type="submit" name="btnCancelOrderTotals" value="@Loc["Admin.Orders.Fields.CancelOrderTotals"]" onclick=" toggleOrderTotals(false);return false; " id="btnCancelOrderTotals" class="k-button"/>
    </div>
</div>
<div class="form-group">
    <admin-label asp-for="PaymentMethod" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
    <div class="col-9 col-md-9 col-sm-9">
        <label class="control-label">@Model.PaymentMethod</label>
    </div>
</div>

@if (Model.CustomValues is { Count: > 0 })
{
    <div class="form-group">
        <admin-label asp-for="CustomValues" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
        <div class="col-9 col-md-9 col-sm-9">
            <table>
                @foreach (var item in Model.CustomValues)
                {
                    <tr>
                        <td>@item.Key:</td>
                        <td>@(item.Value != null ? item.Value.ToString() : "")</td>
                    </tr>
                }
            </table>
        </div>
    </div>
}
<div class="form-group">
    <admin-label asp-for="CreatedOn" asp-display-hint="false" class="control-label col-3 col-md-3 col-sm-3"></admin-label>
    <div class="col-9 col-md-9 col-sm-9">
        <label class="control-label"> @Html.DisplayFor(model => model.CreatedOn)</label>
    </div>
</div>
</div>
<vc:admin-widget widget-zone="order_details_info_bottom" additional-data="Model"/>
</div>